package com.lancoo.znbkxx.teacher.service

import com.lancoo.znbkxx.teacher.model.data.*
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

interface ProblemService {

    /*获取难题列表*/
    @GET("W_ZNBK_GetHardItemSolutionList")
    suspend fun getHardItemSolutionList(
            @Query("Token") Token: String,
            @Query("TID") TID: String,
            @Query("CourseClassID") CourseClassID: String,
            @Query("SchoolID") SchoolID: String,
            @Query("StageNo") StageNo: String
    ): ZnbkResponse<HardSolution>

    /*获取某道难题的讲解方案*/
    @GET("W_ZNBK_GetHardItemSolution")
    suspend fun getHardItemSolution(
            @Query("TID") TID: String,
            @Query("CourseClassID") CourseClassID: String,
            @Query("SchoolID") SchoolID: String,
            @Query("Token") Token: String,
            @Query("QuesID") QuesID: String,
            @Query("PaperID") PaperID: String,
            @Query("SetID") SetID: String,
            @Query("StageNo") StageNo: String
    ): ZnbkResponse<HardItemSolution>

    /*保存难题讲评*/
    @POST("W_ZNBK_SaveHardItemSolution")
    suspend fun saveHardItemSolution(@Body requestBody: RequestBody): ZnbkResponse<Int>

    /*获取巩固详情*/
    @GET("W_ZNBK_GetHardQuesPassedOrFailedStu")
    suspend fun getHardQuesPassedOrFailedStu(
            @Query("CourseClassID") CourseClassID: String,
            @Query("Key") Key: String,
            @Query("QueID") QueID: String,
            @Query("SchoolID") SchoolID: String,
            @Query("SubjectID") SubjectID: String,
            @Query("Token") Token: String,
            @Query("UserID") UserID: String
    ): ZnbkResponse<ReviewedDetail>

    /*获取当前试题的所有经典案例*/
    @POST("W_ZNBK_GetClassicalList")
    suspend fun getClassicalList(
            @Body requestBody: RequestBody): ZnbkResponse<MutableList<Classical>>

    /*获取已选择经典案例的详细作答*/
    @POST("W_ZNBK_GetSelectedClassicalList")
    suspend fun getSelectedClassicalList(
            @Body requestBody: RequestBody): ZnbkResponse<MutableList<Classical>>

    /*获取知识点列表*/
    @POST("W_ZNBK_GetZSDCourseware")
    suspend fun getZSDCourseware(@Body requestBody: RequestBody): ZnbkResponse<KnowledgeInfo>

    /*获取学生作答详情*/
    @GET("W_ZNBK_GetStuAnswerList")
    suspend fun getStuAnswerList(
            @Query("StageNo") StateNo: String,
            @Query("TID") TID: String,
            @Query("CourseClassID") CourseClassID: String,
            @Query("SchoolID") SchoolID: String,
            @Query("Token") Token: String,
            @Query("QuesID") QuesID: String
    ): ZnbkResponse<MutableList<AnswerDetail>>

    @GET("/WordTrain/GetKlgCode")
    suspend fun getKlgCode(
            @Query("Token") Token: String,
            @Query("UserID") UserID: String,
            @Query("StageNo") StageNo: String,
            @Query("UniqueCode") UniqueCode: String
    ): ZnbkResponse<String>

    @GET("/CNTFX/api/CNT/GetAnswerSkillForMobile")
    suspend fun getAnswerSkill(
            @Query("Token") Token: String,
            @Query("UserID") UserID: String,
            @Query("StageNo") StageNo: String,
            @Query("SchoolID") SchoolID: String,
            @Query("StuID") StuID: String,
            @Query("PageIndex") PageIndex: Int,
            @Query("PageNum") PageNum: Int
    ): ZnbkResponse<SkillListBean>

    @GET("/CNTFX/api/CNT/GetQTypeCommentsForTeacher")
    suspend fun getQTypeComments(
            @Query("Token") Token: String,
            @Query("UserID") UserID: String,
            @Query("StageNo") StageNo: String,
            @Query("SchoolID") SchoolID: String,
            @Query("StuID") StuID: String,
            @Query("TypeNo") TypeNo: String,
            @Query("GenreID") GenreID: String
    ): ZnbkResponse<SkillCommentInfoBean>

    @GET("/CNTFX/api/CNT/GetChangeExpandPracticeQues")
    suspend fun getChangeExpandPracticeQues(
            @Query("Token") Token: String,
            @Query("UserID") UserID: String,
            @Query("StageNo") StageNo: String,
            @Query("SchoolID") SchoolID: String,
            @Query("StuID") StuID: String,
            @Query("TypeNo") TypeNo: String,
            @Query("GenreID") GenreID: String
    ): ZnbkResponse<MutableList<RecQuesID>>

    @GET("/CNTFX/api/CNT/GetResourceQuesInfo")
    suspend fun getResourceQuesInfo(
            @Query("QuesIDs") QuesIDs: String,
            @Query("StageNo") StageNo: String,
            @Query("StartIndex") StartIndex: Int,
            @Query("IsSerial") IsSerial: Boolean,
            @Query("IsReplace") IsReplace: Boolean,
            @Query("PlatForm") PlatForm: Int
    ): ZnbkResponse<MutableList<TkModel>>

    @GET("/CNTFX/api/CNT/GetChangeClassicWrongQues")
    suspend fun getChangeClassicWrongQues(
            @Query("Token") Token: String,
            @Query("UserID") UserID: String,
            @Query("StageNo") StageNo: String,
            @Query("SchoolID") SchoolID: String,
            @Query("StuID") StuID: String,
            @Query("TypeNo") TypeNo: String,
            @Query("GenreID") GenreID: String
    ): ZnbkResponse<MutableList<ClassicWrongQue>>

    @GET("/CNTFX/api/CNT/GetAnswerSkillList")
    suspend fun getAnswerSkillList(
            @Query("Token") Token: String,
            @Query("UserID") UserID: String,
            @Query("StageNo") StageNo: String,
            @Query("TypeNo") TypeNo: String,
            @Query("GenreID") GenreID: String
    ): ZnbkResponse<MutableList<AnsweringSkill>>

    @POST("/CNTFX/api/CNT/SaveAnswerSkillSolution")
    suspend fun saveAnswerSkillSolution(@Query("UserID") UserID: String,
                                        @Query("Token") Token: String,
                                        @Body requestBody: RequestBody): ZnbkResponse<ResultInfo>

    @GET("/CNTFX/api/CNT/GetWrongCommentForMobile")
    suspend fun getWrongComment(
            @Query("Token") Token: String,
            @Query("TID") TID: String,
            @Query("UserID") UserID: String,
            @Query("StuID") StuID: String,
            @Query("StageNo") StageNo: String,
            @Query("SchoolID") SchoolID: String,
            @Query("PageIndex") PageIndex: Int,
            @Query("PageNum") PageNum: Int
    ): ZnbkResponse<WrongCommentInfo>

    @GET("/CNTFX/api/CNT/GetWrongSolutionDetail")
    suspend fun getWrongSolutionDetail(
            @Query("TID") TID: String,
            @Query("UserID") UserID: String,
            @Query("StuID") StuID: String,
            @Query("CourseClassID") CourseClassID: String,
            @Query("SchoolID") SchoolID: String,
            @Query("Token") Token: String,
            @Query("QuesID") QuesID: String,
            @Query("StageNo") StageNo: String
    ): ZnbkResponse<HardItemSolution>

    @POST("/CNTFX/api/CNT/SaveWrongSolution")
    suspend fun saveWrongSolution(@Query("UserID") UserID: String, @Query("Token") Token: String,
                                  @Body requestBody: RequestBody): ZnbkResponse<ResultInfo>
}
